﻿//© 2010-2011 mOcean Mobile. A subsidiary of Mojiva, Inc. All Rights Reserved.

using System.Drawing;
using System.Windows.Forms;
using mOceanWindows;

namespace mOceanTest
{
    public partial class frmCallbackSimpleAd : Form
    {
        public frmCallbackSimpleAd()
        {
            InitializeComponent();

            adViewControl1.Zone = "20249";
            adViewControl1.Site = "8061";
            adViewControl1.HorizonalAlignment = AdViewControl.HORIZONTAL_ALIGNMENT.HORZ_CENTER;
            adViewControl1.VerticalAlignment = AdViewControl.VERTICAL_ALIGNMENT.VERT_CENTER;
            adViewControl1.UpdateTime = 300;
            adViewControl1.InternalBrowser = true;
            adViewControl1.Update();
        }

        private void adViewControl1_AdDownloadError(string error)
        {
            txtLog.AppendText("AdDownloadError: " + error + "\r\n");
        }

        private void adViewControl1_AdWebViewClosing(string url)
        {
            txtLog.AppendText("AdWebViewClosing: " + url +"\r\n");
        }

        private bool adViewControl1_AdNavigateBanner(string url)
        {
            txtLog.AppendText("AdNavigateBanner: " + url + "\r\n");
            return false;
        }

        private void adViewControl1_AdDownloadBegin()
        {
            txtLog.AppendText("AdDownloadBegin\r\n");
        }

        private void adViewControl1_AdDownloadEnd()
        {
            txtLog.AppendText("AdDownloadEnd\r\n");
        }
    }
}
